import request from '../request'
import type { AdminStatisticsVO, TeacherStatisticsVO, StudentStatisticsVO } from '@/types/statistics'

/**
 * 获取管理员统计数据
 */
export function getAdminStatistics(params?: {
  gradeId?: number;
  majorId?: number;
  classId?: number;
}) {
  return request<AdminStatisticsVO>({
    url: '/v1/statistics/admin',
    method: 'get',
    params
  })
}

/**
 * 获取教师统计数据
 * @param classId 班级ID（可选）
 */
export const getTeacherStatistics = (classId?: number) => {
  return request<TeacherStatisticsVO>({
    url: '/v1/statistics/teacher',
    method: 'GET',
    params: {
      classId
    }
  })
}

/**
 * 获取学生统计数据
 */
export function getStudentStatistics() {
  return request<StudentStatisticsVO>({
    url: '/v1/statistics/student',
    method: 'get'
  })
} 